var userInfo={
    nickname:'bby',
    userId:'8541545815565',
    // avatar:'img/avatar5.png',
    email:'bby@123.com',
    nickname:'本小蛋',
    scores:123,
    label_num:12,
    be_collected:333,
    signature:'',
    birthday:'',
    storage_max:'2G',
    storage_use:'1.2G',
    sex:1
}
var labels=[
    'Bob/movies',
    'Alssssice/pictures',
    'Alice/pictures',
    'Alice/pictures',
]
var logs=[
    {nickname: '本小蛋',time:'2021/08/15 12:54:55',op:'上传文件',content:'/bby/ajj/lajsalkjmkjasajsa/txt'},
    {nickname: '本小蛋',time:'2021/08/15 12:54:55',op:'上传文件',content:'/bby/ajj/lajsalkjmkjasajsa/txt'},
    {nickname: '本小蛋',time:'2021/08/15 12:54:55',op:'上传文件',content:'/bby/ajj/lajsalkjmkjasajsa/txt'},
]
var userPageVue=new Vue({
    el:'#userContent',
    data:{
        userInfo:userInfo,
        labels:labels,
        logs:logs
    }
})



setUserInfo(userInfo)
function setUserInfo(userInfo){
    editInputUsername.value=userInfo.nickname;
    editInputEmail.value=userInfo.email;
    editInputNickname.value=userInfo.nickname;
    editInputSignature.value=userInfo.signature;
    editInputBirthday.value=userInfo.birthday;
    // editInputSex.value=userInfo.sex;
}
function canUserInfoInput(can){
    let canNot=!can;
    editUserInfoBt.hidden=can;
    editUserInfoCancelBt.hidden=!can;
    editUserInfoConfirmBt.hidden=!can;

    editInputUsername.disabled=canNot;
    editInputEmail.disabled=canNot;
    editInputNickname.disabled=canNot;
    editInputSignature.disabled=canNot;
    editInputBirthday.disabled=canNot;
    editInputSex.disabled=canNot;
}
editUserInfoBt.onclick=function () {
    canUserInfoInput(true)
}
editUserInfoCancelBt.onclick=function () {
    canUserInfoInput(false)
}
editUserInfoConfirmBt.onclick=function () {
    canUserInfoInput(false)
}
